<?php
defined('IN_GUOPHP') or exit('Access Denied');

class douyin{


	function __construct() {
	
	}

	/**
	 * 获取表单数据
	 */
	public function getdatalist() {
		$allow_origin = array(
            'http://www.d525666.com', //注意加上http或https
            'https://d525.gitee.io',
            'http://b.baidu.com',
        );
        //跨域访问的时候才会存在此字段
        $origin = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : '';
        if (in_array($origin, $allow_origin)) {
            header('Access-Control-Allow-Origin:'.$origin);
        }
        
		$db = D('dishonesty');
		$tid = isset($_GET['tid']) ? $_GET['tid'] : '';
		if(!$tid) return_json(array('status'=>0, 'message'=>'参数错误'));
		$data = $db->where(array('tid'=>$tid))->select();
		return_json(array('data'=>$data));
		
	}

	

}
